3.253 \(\int \frac{(e+f x) \cos (c+d x)}{a+a \sin (c+d x)} \, dx\)

Optimal. Leaf size=79 \[ -\frac{2 i f \text{PolyLog}\left (2,i e^{i (c+d x)}\right )}{a d^2}+\frac{2 (e+f x) \log \left (1-i e^{i (c+d x)}\right )}{a d}-\frac{i (e+f x)^2}{2 a f} \]

[Out]

((-I/2)*(e + f*x)^2)/(a*f) + (2*(e + f*x)*Log[1 - I*E^(I*(c + d*x))])/(a*d) - ((2*I)*f*PolyLog[2, I*E^(I*(c +
d*x))])/(a*d^2)

________________________________________________________________________________________

Rubi [A]  time = 0.125063, antiderivative size = 79, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {4517, 2190, 2279, 2391} \[ -\frac{2 i f \text{PolyLog}\left (2,i e^{i (c+d x)}\right )}{a d^2}+\frac{2 (e+f x) \log \left (1-i e^{i (c+d x)}\right )}{a d}-\frac{i (e+f x)^2}{2 a f} \]

Antiderivative was successfully verified.

[In]

Int[((e + f*x)*Cos[c + d*x])/(a + a*Sin[c + d*x]),x]

[Out]

((-I/2)*(e + f*x)^2)/(a*f) + (2*(e + f*x)*Log[1 - I*E^(I*(c + d*x))])/(a*d) - ((2*I)*f*PolyLog[2, I*E^(I*(c +
d*x))])/(a*d^2)

Rule 4517

Int[(Cos[(c_.) + (d_.)*(x_)]*((e_.) + (f_.)*(x_))^(m_.))/((a_) + (b_.)*Sin[(c_.) + (d_.)*(x_)]), x_Symbol] :>
-Simp[(I*(e + f*x)^(m + 1))/(b*f*(m + 1)), x] + Dist[2, Int[((e + f*x)^m*E^(I*(c + d*x)))/(a - I*b*E^(I*(c + d
*x))), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IGtQ[m, 0] && EqQ[a^2 - b^2, 0]

Rule 2190

Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/((a_) + (b_.)*((F_)^((g_.)*((e_.) +
 (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[((c + d*x)^m*Log[1 + (b*(F^(g*(e + f*x)))^n)/a])/(b*f*g*n*Log[F]), x]
 - Dist[(d*m)/(b*f*g*n*Log[F]), Int[(c + d*x)^(m - 1)*Log[1 + (b*(F^(g*(e + f*x)))^n)/a], x], x] /; FreeQ[{F,
a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]

Rule 2279

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin{align*} \int \frac{(e+f x) \cos (c+d x)}{a+a \sin (c+d x)} \, dx &=-\frac{i (e+f x)^2}{2 a f}+2 \int \frac{e^{i (c+d x)} (e+f x)}{a-i a e^{i (c+d x)}} \, dx\\ &=-\frac{i (e+f x)^2}{2 a f}+\frac{2 (e+f x) \log \left (1-i e^{i (c+d x)}\right )}{a d}-\frac{(2 f) \int \log \left (1-i e^{i (c+d x)}\right ) \, dx}{a d}\\ &=-\frac{i (e+f x)^2}{2 a f}+\frac{2 (e+f x) \log \left (1-i e^{i (c+d x)}\right )}{a d}+\frac{(2 i f) \operatorname{Subst}\left (\int \frac{\log (1-i x)}{x} \, dx,x,e^{i (c+d x)}\right )}{a d^2}\\ &=-\frac{i (e+f x)^2}{2 a f}+\frac{2 (e+f x) \log \left (1-i e^{i (c+d x)}\right )}{a d}-\frac{2 i f \text{Li}_2\left (i e^{i (c+d x)}\right )}{a d^2}\\ \end{align*}

Mathematica [B]  time = 0.506804, size = 246, normalized size = 3.11 \[ \frac{-4 i f \text{PolyLog}\left (2,i e^{i (c+d x)}\right )-i c^2 f+4 d e \log \left (\sin \left (\frac{1}{2} (c+d x)\right )+\cos \left (\frac{1}{2} (c+d x)\right )\right )-2 i c d f x+4 c f \log \left (1-i e^{i (c+d x)}\right )+4 \pi f \log \left (1+e^{-i (c+d x)}\right )+4 d f x \log \left (1-i e^{i (c+d x)}\right )+2 \pi f \log \left (1-i e^{i (c+d x)}\right )-2 \pi f \log \left (\sin \left (\frac{1}{4} (2 c+2 d x+\pi )\right )\right )-4 \pi f \log \left (\cos \left (\frac{1}{2} (c+d x)\right )\right )-4 c f \log \left (\sin \left (\frac{1}{2} (c+d x)\right )+\cos \left (\frac{1}{2} (c+d x)\right )\right )+i \pi c f-i d^2 f x^2+i \pi d f x}{2 a d^2} \]

Antiderivative was successfully verified.

[In]

Integrate[((e + f*x)*Cos[c + d*x])/(a + a*Sin[c + d*x]),x]

[Out]

((-I)*c^2*f + I*c*f*Pi - (2*I)*c*d*f*x + I*d*f*Pi*x - I*d^2*f*x^2 + 4*f*Pi*Log[1 + E^((-I)*(c + d*x))] + 4*c*f
*Log[1 - I*E^(I*(c + d*x))] + 2*f*Pi*Log[1 - I*E^(I*(c + d*x))] + 4*d*f*x*Log[1 - I*E^(I*(c + d*x))] - 4*f*Pi*
Log[Cos[(c + d*x)/2]] + 4*d*e*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] - 4*c*f*Log[Cos[(c + d*x)/2] + Sin[(c +
 d*x)/2]] - 2*f*Pi*Log[Sin[(2*c + Pi + 2*d*x)/4]] - (4*I)*f*PolyLog[2, I*E^(I*(c + d*x))])/(2*a*d^2)

________________________________________________________________________________________

Maple [B]  time = 0.148, size = 203, normalized size = 2.6 \begin{align*}{\frac{-{\frac{i}{2}}f{x}^{2}}{a}}+{\frac{iex}{a}}-2\,{\frac{\ln \left ({{\rm e}^{i \left ( dx+c \right ) }} \right ) e}{da}}+2\,{\frac{\ln \left ({{\rm e}^{i \left ( dx+c \right ) }}+i \right ) e}{da}}-{\frac{2\,ifcx}{da}}-{\frac{if{c}^{2}}{a{d}^{2}}}+2\,{\frac{f\ln \left ( 1-i{{\rm e}^{i \left ( dx+c \right ) }} \right ) x}{da}}+2\,{\frac{f\ln \left ( 1-i{{\rm e}^{i \left ( dx+c \right ) }} \right ) c}{a{d}^{2}}}-{\frac{2\,if{\it polylog} \left ( 2,i{{\rm e}^{i \left ( dx+c \right ) }} \right ) }{a{d}^{2}}}+2\,{\frac{cf\ln \left ({{\rm e}^{i \left ( dx+c \right ) }} \right ) }{a{d}^{2}}}-2\,{\frac{cf\ln \left ({{\rm e}^{i \left ( dx+c \right ) }}+i \right ) }{a{d}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x+e)*cos(d*x+c)/(a+a*sin(d*x+c)),x)

[Out]

-1/2*I/a*f*x^2+I/a*e*x-2/a/d*ln(exp(I*(d*x+c)))*e+2/a/d*ln(exp(I*(d*x+c))+I)*e-2*I/a/d*f*c*x-I/a/d^2*f*c^2+2/a
/d*f*ln(1-I*exp(I*(d*x+c)))*x+2/a/d^2*f*ln(1-I*exp(I*(d*x+c)))*c-2*I*f*polylog(2,I*exp(I*(d*x+c)))/a/d^2+2/a/d
^2*f*c*ln(exp(I*(d*x+c)))-2/a/d^2*f*c*ln(exp(I*(d*x+c))+I)

________________________________________________________________________________________

Maxima [A]  time = 1.36503, size = 157, normalized size = 1.99 \begin{align*} \frac{-i \, d^{2} f x^{2} - 2 i \, d^{2} e x - 4 i \, d f x \arctan \left (\cos \left (d x + c\right ), \sin \left (d x + c\right ) + 1\right ) + 4 i \, d e \arctan \left (\sin \left (d x + c\right ) + 1, \cos \left (d x + c\right )\right ) - 4 i \, f{\rm Li}_2\left (i \, e^{\left (i \, d x + i \, c\right )}\right ) + 2 \,{\left (d f x + d e\right )} \log \left (\cos \left (d x + c\right )^{2} + \sin \left (d x + c\right )^{2} + 2 \, \sin \left (d x + c\right ) + 1\right )}{2 \, a d^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*cos(d*x+c)/(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

1/2*(-I*d^2*f*x^2 - 2*I*d^2*e*x - 4*I*d*f*x*arctan2(cos(d*x + c), sin(d*x + c) + 1) + 4*I*d*e*arctan2(sin(d*x
+ c) + 1, cos(d*x + c)) - 4*I*f*dilog(I*e^(I*d*x + I*c)) + 2*(d*f*x + d*e)*log(cos(d*x + c)^2 + sin(d*x + c)^2
 + 2*sin(d*x + c) + 1))/(a*d^2)

________________________________________________________________________________________

Fricas [B]  time = 1.94904, size = 425, normalized size = 5.38 \begin{align*} \frac{-i \, f{\rm Li}_2\left (i \, \cos \left (d x + c\right ) - \sin \left (d x + c\right )\right ) + i \, f{\rm Li}_2\left (-i \, \cos \left (d x + c\right ) - \sin \left (d x + c\right )\right ) +{\left (d e - c f\right )} \log \left (\cos \left (d x + c\right ) + i \, \sin \left (d x + c\right ) + i\right ) +{\left (d f x + c f\right )} \log \left (i \, \cos \left (d x + c\right ) + \sin \left (d x + c\right ) + 1\right ) +{\left (d f x + c f\right )} \log \left (-i \, \cos \left (d x + c\right ) + \sin \left (d x + c\right ) + 1\right ) +{\left (d e - c f\right )} \log \left (-\cos \left (d x + c\right ) + i \, \sin \left (d x + c\right ) + i\right )}{a d^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*cos(d*x+c)/(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

(-I*f*dilog(I*cos(d*x + c) - sin(d*x + c)) + I*f*dilog(-I*cos(d*x + c) - sin(d*x + c)) + (d*e - c*f)*log(cos(d
*x + c) + I*sin(d*x + c) + I) + (d*f*x + c*f)*log(I*cos(d*x + c) + sin(d*x + c) + 1) + (d*f*x + c*f)*log(-I*co
s(d*x + c) + sin(d*x + c) + 1) + (d*e - c*f)*log(-cos(d*x + c) + I*sin(d*x + c) + I))/(a*d^2)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{e \cos{\left (c + d x \right )}}{\sin{\left (c + d x \right )} + 1}\, dx + \int \frac{f x \cos{\left (c + d x \right )}}{\sin{\left (c + d x \right )} + 1}\, dx}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*cos(d*x+c)/(a+a*sin(d*x+c)),x)

[Out]

(Integral(e*cos(c + d*x)/(sin(c + d*x) + 1), x) + Integral(f*x*cos(c + d*x)/(sin(c + d*x) + 1), x))/a

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (f x + e\right )} \cos \left (d x + c\right )}{a \sin \left (d x + c\right ) + a}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*cos(d*x+c)/(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

integrate((f*x + e)*cos(d*x + c)/(a*sin(d*x + c) + a), x)